package com.example.vdmtest.tools;

import com.example.vdmtest.R;
import com.vivo.ic.dm.Constants;
import com.vivo.ic.dm.DownloadNotifier;

import android.content.Context;

/**
 * 告知下载组件一些必备的UI元素。如果要完全自定义通知栏，可以直接继承DownloadNotifierBase类
 */
public class Notifier extends DownloadNotifier {

    /**
     * @param context
     */
    public Notifier(Context context) {
        super(context);
    }

    @Override
    public int getNotiIdDownloading(int id) {
        return id + Constants.NOTI_ID_DOWNLOAD_ACTIVE;
    }

    @Override
    public int getNotiIdDownloadFinished(int id) {
        return id + Constants.NOTI_ID_DOWNLOAD_COMPLETED;
    }

    @Override
    public int getNotiIdDownloadWarn() {
        return Constants.NOTI_ID_NET_CHANGE_WARNING;
    }

    @Override
    public String getStringUnknowTitle() {
        return mRes.getString(R.string.dm_noti_unknown_title);
    }

    @Override
    public String getStringMultiDownloading(int downloadNum) {
        return mRes.getString(R.string.dm_noti_download_N,downloadNum);
    }

    @Override
    public String getStringDownloadFailed() {
        return mRes.getString(R.string.dm_noti_download_failed);
    }

    @Override
    public String getStringDownloadSuccess() {
        return mRes.getString(R.string.dm_noti_download_complete);
    }

    @Override
    public String getStringDownloadWarnTiltle() {
        return mRes.getString(R.string.dm_noti_download_paused);
    }

    @Override
    public String getStringDownloadWarnContent() {
        return mRes.getString(R.string.dm_noti_wlan_disconnected);
    }

    @Override
    public int getIconIdDownloading() {
        return R.drawable.dm_noti_icon_download;
    }

    @Override
    public int getIconIdDownloadSuccess() {
        return R.drawable.dm_noti_icon_done;
    }

    @Override
    public int getIconIdDownloadFailed() {
        return R.drawable.dm_noti_icon_error;
    }

    @Override
    public int getIconIdDownloadWarn() {
        return R.drawable.dm_noti_stat_sys_warning;
    }
}
